const express = require("express");
const pool = require("../pool");
const router = express.Router();
module.exports = router;
router.get('/check_user_name', (req, res) => {
    const value = req.query.uname;
    pool.query("select uid from xz_user where uname=?", [value], (e, result) => {
        if (e) throw e;
        else {
            if (result.length) {
                res.send('exists')
            } else {
                res.send('non-exists')
            }
        }
    })
})
